import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class NodeSpeed extends StatelessWidget {
  double size;
  Color? color;
  NodeSpeed({super.key, this.size = 20, this.color = Colors.transparent});

  @override
  Widget build(BuildContext context) {
    return Transform.scale(
      scale: (size / 20),
      child: Container(
          width: 20.w,
          height: 20.w,
          child: Stack(
            alignment: Alignment.center,
            children: [
              Container(
                width: 9.w,
                height: 9.w,
                decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(5.w),
                  color: color,
                ),
              ),
              Positioned(
                  top: 9.w,
                  left: 1.w,
                  child: Container(
                    decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(3.w),
                      color: color,
                    ),
                    width: 18.w,
                    height: 2.w,
                  ))
            ],
          )),
    );
  }
}
